package com.gxa.service.Impl;

import com.gxa.domain.entity.PayProject;
import com.gxa.mapper.PayProjectMapper;
import com.gxa.service.PayProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PayProjectServiceImpl implements PayProjectService {
    @Autowired
    private PayProjectMapper payProjectMapper;
    public PayProject findPayProjectById(int payProjectId){
        PayProject payProject = new PayProject();
        payProject = payProjectMapper.queryById(payProjectId);
        System.out.println("查询的payProject："+payProject);
        return payProject;
    }

    @Override
    public List<PayProject> queryAll() {
        return payProjectMapper.queryAll();
    }

    @Override
    public List<PayProject> queryPage(int page, int size) {
        return payProjectMapper.queryPage(page, size);
    }

    @Override
    public void updateById(Long id, String columnName) {
        payProjectMapper.updateById(id, columnName);
    }

    @Override
    public void deleteById(Long id) {
        payProjectMapper.deleteById(id);
    }

    @Override
    public void insert(PayProject payProject) {
        payProjectMapper.add(payProject);
    }
}
